home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 August: Tool Chest / Apple_Developer_Group_August_1996_Tool_Chest.iso / Sample Code / Snippets / Files / GetOwnerGroup / GetOwnerGroup.r < prev    next >
Encoding:
Text File  |  1995-08-07  |  3.0 KB  |  108 lines  |  [TEXT/MPS ]

  1. #define SystemSevenOrLater 1
  2. #include "Types.r"
  3.  
  4. /* This resource is the standard "put" file DLOG, renamed to 256 */
  5. resource 'DLOG' (256, purgeable)
  6.     {
  7.         {0, 0, 188, 344}, dBoxProc, invisible, noGoAway, 0,
  8.          256, "", noAutoCenter
  9.     };
  10.  
  11. /*
  12.  * This resource is the standard "put" file DITL, renamed to 256 with these changes:
  13.  * • button 1 is changed in size, location, and title
  14.  * • item 10 (prompt) is moved out of the dialog to be invisible
  15.  * • item 11 (initial file name) is moved out of the dialog to be invisible
  16.  * In addition, when I pass this DLOG/DITL to CustomPutFile(), I pass CustomPutFile()
  17.  * an activation list which tells it that only item 7 (file/folder list) can have
  18.  * keys activated against it.
  19.  *
  20.  * Things you would want to modify
  21.  * Get rid of the New Folder button
  22.  * Make the help item point to a non-system help resource
  23.  */
  24. resource 'DITL'(256)
  25.     {    {
  26.                     /* changed this button's size and location */
  27.                     {152, 64, 172, 187}, Button { enabled, "Select this Folder" },
  28.                     {130, 252, 150, 332}, Button { enabled, "Cancel" },
  29.                     {0, 0, 0, 0}, HelpItem { disabled, HMScanhdlg {-6043}},
  30.                     {8, 235, 24, 337}, UserItem { enabled },
  31.                     {32, 252, 52, 332}, Button { enabled, "Eject" },
  32.                     {60, 252, 80, 332}, Button { enabled, "Desktop" },
  33.                     
  34.                     /* This is the only item I'll have in my activation list. */
  35.                     {29, 12, 127, 230}, UserItem { enabled },
  36.                     {6, 12, 25, 230}, UserItem { enabled },
  37.                     {119, 250, 120, 334}, Picture { disabled, 11 },
  38.  
  39.                     /* moved offscreen to look more like a get dialog */
  40.                     {-157, -15, -173, -227}, EditText { enabled, "" },
  41.  
  42.                     /* moved offscreen to look more like a get dialog */
  43.                     {-136, -15, -152, -227}, StaticText { disabled, "Get File Named:" },
  44.  
  45.                     {88, 252, 108, 332}, UserItem { disabled },
  46.     }    };
  47.  
  48.  
  49. /* This resource is used to tell the result */
  50. resource 'ALRT' (257) {
  51.     {40, 40, 161, 365},
  52.     257,
  53.     {    /* array: 4 elements */
  54.         /* [1] */
  55.         OK, visible, sound1,
  56.         /* [2] */
  57.         OK, visible, sound1,
  58.         /* [3] */
  59.         OK, visible, sound1,
  60.         /* [4] */
  61.         OK, visible, sound1
  62.     },
  63.     centerMainScreen
  64. };
  65.  
  66. resource 'DITL' (257) {
  67.     {    /* array DITLarray: 2 elements */
  68.         /* [1] */
  69.         {90, 140, 110, 198},
  70.         Button {
  71.             enabled,
  72.             "OK"
  73.         },
  74.         /* [2] */
  75.         {10, 30, 75, 302},
  76.         StaticText {
  77.             disabled,
  78.             "Directory/Folder Name:  ^0\nOwner Name: ^1\nGroup Name: ^2"
  79.         }
  80.     }
  81. };
  82.  
  83. /* StandardGetFile() DLOG */
  84. resource 'DLOG' (-6042, purgeable)
  85.     {
  86.         {0, 0, 206, 344}, dBoxProc, invisible, noGoAway, 0,
  87.          -6042, "", noAutoCenter
  88.     };
  89.  
  90.  
  91.  
  92. /* StandardGetFile() DITL */
  93. resource 'DITL'(-6042)    {    {
  94.                     {135, 252, 155, 332}, Button { enabled, "Open" },
  95.                     {104, 252, 124, 332}, Button { enabled, "Cancel" },
  96.                     {0, 0, 0, 0}, HelpItem { disabled, HMScanhdlg {-6042}},
  97.                     {8, 235, 24, 337}, UserItem { enabled },
  98.                     {32, 252, 52, 332}, Button { enabled, "Eject" },
  99.                     {60, 252, 80, 332}, Button { enabled, "Desktop" },
  100.                     {29, 12, 159, 230}, UserItem { enabled },
  101.                     {6, 12, 25, 230}, UserItem { enabled },
  102.                     {91, 251, 92, 333}, Picture  { disabled, 11 },
  103.                     {164, 251, 184, 333}, Button {enabled, "Select"}
  104.     }    };
  105.  
  106.  
  107.  
  108.